﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UI;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using CurvedUI;

public class MenuPanel :BasePanel  {
    // Use this for initialization
    private CanvasGroup canvasGroup;//获取CanvasGroup组件，用于控制该面板的交互功能
    private CurvedUISettings uisettings;//环形UI组件
    void Awake () {
        canvasGroup = GetComponent<CanvasGroup>();
        uisettings  = GameObject.Find("Canvas").transform.GetComponent<CurvedUISettings>();
    }
    public override void OnEnter()
    {
        uisettings.Angle = 90;
        gameObject.SetActive(true);

    }
    public override void OnExit()
    {
        gameObject.SetActive(false);
    }
    // Update is called once per frame
    void Update () {
       
    }
    public void OnClick(string panelTypeString)
    {
        UIPanelType panelType = (UIPanelType)System.Enum.Parse(typeof(UIPanelType), panelTypeString);
        UIManager.Instance.PopPanel();
        UIManager.Instance.PushPanel(panelType);
    }
   
    

}
